namespace Crux.Core.LangChain.Abstractions.Databases.Metadatas;
/// <summary>
/// 
/// </summary>
public class VectorSearchRequest
{
    /// <summary>
    /// Embedding to look up documents similar to.
    /// </summary>
    public float[][] Embeddings { get; set; } = Array.Empty<float[]>();
    /// <summary>
    /// 
    /// </summary>
    /// <param name="embedding"></param>
    public static implicit operator VectorSearchRequest(float[] embedding)
    {
        return ToVectorSearchRequest(embedding);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="embeddings"></param>
    public static implicit operator VectorSearchRequest(float[][] embeddings)
    {
        return ToVectorSearchRequest(embeddings);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="embedding"></param>
    public static VectorSearchRequest ToVectorSearchRequest(float[] embedding)
    {
        return ToVectorSearchRequest([embedding]);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="embeddings"></param>
    public static VectorSearchRequest ToVectorSearchRequest(float[][] embeddings)
    {
        return new VectorSearchRequest
        {
            Embeddings = embeddings,
        };
    }
}